import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import vueJsx from "@vitejs/plugin-vue-jsx";
import path from "path";
export default defineConfig({
  plugins: [vue(), vueJsx()],
  resolve: {
    extensions: [".js", ".jsx", ".ts", ".tsx", ".json", ".vue"],
    alias: {
      "@": path.resolve(__dirname, "./src"),
    },
  },
  build: {
    rollupOptions: {
      output: {
        format: "es", // 确保输出格式为 ES Module
      },
    },
  },
  server: {
    port: 3000, // 自定义端口
    open: true, // 自动打开浏览器
  },
});
